'use strict';

/**
 * @param {Egg.Application} app - egg application
 */

module.exports = app => {

  const { router, controller } = app

  const { api, common } = controller


  app.router.resources('user', '/show/api/user', api.user)

  app.router.resources('kanban', '/show/api/kanban', api.kanban)
  app.post('/show/api/addMoule', api.kanban.addModule)
  app.post('/show/api/removeModule', api.kanban.removeModule)

  app.router.resources('module', '/show/api/module', api.module)
 
  app.post('/show/user/reg', api.user.create)
  app.post('/show/user/login', api.login.login)
  app.get('/show/user/logout', api.login.logout)
  app.get('/show/user/info', api.login.info)

  // 验证码
  app.get('/show/common/captcha', common.captcha.captcha)
  
}
